DateTime widget

Path: Widget Gallery> Basic> Controls

Use this widget to display and edit current date and time .

In the Properties pane different formats are available for representing date and time.

Time options

For the Time Spec property select which time the widget will show at runtime.

Option Description
local shows local time, the time of the HMI device where the project is running
global shows Global Time (GMT)
server shows  time information as handled by the server side of the HMI device
Time and Date placeholders

You can use placeholders to freely define the Time and Date format

Date Description
d the day as number without a leading zero (1 to 31)
dd the day as number with a leading zero (01 to 31)
ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun')
dddd the long localized day name (e.g. 'Monday' to 'Sunday')
M the month as number without a leading zero (1-12)
MM the month as number with a leading zero (01-12)
MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec')
MMMM the long localized month name (e.g. 'January' to 'December')
yy the year as two digit number (00-99)
yyyy the year as four digit number
Time Description
h the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
hh the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
m the minute without a leading zero (0 to 59)
mm the minute with a leading zero (00 to 59)
s the whole second without a leading zero (0 to 59)
ss the whole second with a leading zero where applicable (00 to 59)
AP or A use AM/PM display. A/AP will be replaced by either "AM" or "PM"
ap or a use am/pm display. a/ap will be replaced by either "am" or "pm"

Regional Settings

You can use even the SHORT-DATE or the LONG-DATE placeholders to use the format defined inside the Regional Setting (see "Regional Settings")